<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"    
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>the-new-allter</title>
    </h:head>
    <h:body>
        <font size="2">
            <h:form>
                <p:tabMenu activeIndex="0">
                    <p:menuitem value="Home" action="index?faces-redirect=true" />
                    <p:menuitem value="Music" action="musicsearch?faces-redirect=true" />
                    <p:menuitem value="Video" action="videosearch?faces-redirect=true" />
                    <p:menuitem value="Help" action="help?faces-redirect=true" />
                </p:tabMenu> 
            </h:form>
            <!--part for insert info-->
            <h:form>           
                <p:panel header="the-new-allter search">
                    <h:panelGrid columns="4">
                        <h:panelGroup>
                            <p:growl id="msg" />
                            <h:outputText value="Filename:  " style="font-weight: bold" />
                            <p:inputText id="filename" required="true" value="#{MainSearch.fileName}" label="Filename" size="20" />
                        </h:panelGroup>

                        <p:commandButton id="search_btn" value="Allter It!" update="DataTable,msg"
                                         actionListener="#{MainSearch.doAction()}" />
                        <h:outputText value=" Type: " style="font-weight: bold" />                       
                        <p:selectOneMenu  id="type" value="#{MainSearch.type}">
                            <f:selectItems value="#{MainSearch.types}" />
                        </p:selectOneMenu>

                    </h:panelGrid>
                    <p:dataTable id="DataTable" var="FileResult" value="#{MainSearch.resultSearch}">
                        <p:column headerText="File Name">
                            <h:outputText value="#{FileResult.fileName}" />
                        </p:column>

                        <p:column headerText="Size">
                            <h:outputText value="#{FileResult.size}" />
                        </p:column>

                        <p:column headerText="Folders">
                            <h:outputText value="#{FileResult.folders}" />
                        </p:column>
                    </p:dataTable>

                </p:panel>
            </h:form>
        </font>
    </h:body>
</html>

